.deal-detail {
  background-color: #fff;
  min-height: 100vh;

  // 面包屑导航
  .breadcrumb-nav {
    max-width: 1500px;
    margin: 0 auto;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;

    @media (max-width: 768px) {
      padding: 12px 0;
      border-bottom: 1px solid #ddd;
      font-size: 12px;

      :deep(.el-breadcrumb) {
        padding: 0 12px;

        .el-breadcrumb__item {
          line-height: 1.5;
        }
      }
    }
  }

  // 主要内容区域
  .product-content {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) 3fr minmax(250px, 1fr);
    gap: 30px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 20px;

    @media (max-width: 1200px) {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 16px;
    }

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
      padding: 0;
      margin-top: 0;
    }

    // 左侧图片区域
    .product-gallery {
      position: sticky;
      top: 20px;
      align-self: start;

      .main-image {
        position: relative;
        width: 100%;
        aspect-ratio: 1;
        border: 1px solid #e7e7e7;
        border-radius: 4px;
        padding: 20px;
        margin-bottom: 12px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;

        &:hover {
          cursor: zoom-in;

          &::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.4);
            pointer-events: none;
          }
        }

        :deep(.el-image) {
          width: 100%;
          height: 100%;
          transition: transform 0.3s ease;

          img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: transform 0.3s ease;
          }
        }
      }

      .thumbnail-list {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
        padding: 0 2px;

        .thumbnail {
          position: relative;
          aspect-ratio: 1;
          border: 1px solid #e7e7e7;
          border-radius: 2px;
          padding: 4px;
          cursor: pointer;
          background: #fff;
          transition: all 0.2s ease;

          &:hover {
            border-color: #e77600;
            box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
          }

          &.active {
            border-color: #e77600;
            box-shadow: 0 0 2px 1px rgba(228, 121, 17, 0.5);
          }

          :deep(.el-image) {
            width: 100%;
            height: 100%;

            img {
              width: 100%;
              height: 100%;
              object-fit: contain;
            }
          }
        }
      }

      // 响应式布局
      @media (max-width: 1200px) {
        .main-image {
          padding: 15px;
        }

        .thumbnail-list {
          grid-template-columns: repeat(5, 1fr);
          gap: 8px;
        }
      }

      @media (max-width: 768px) {
        position: relative;
        top: 0;
        padding: 12px;
        background: #fff;

        .main-image {
          border: none;
          padding: 0;
          margin-bottom: 12px;
          border-radius: 0;

          &:hover {
            cursor: default;

            &::after {
              display: none;
            }
          }
        }

        .thumbnail-list {
          display: flex;
          justify-content: center;
          gap: 8px;
          padding: 0;
          max-width: 80%;
          margin: 0 auto;

          .thumbnail {
            width: 60px;
            height: 60px;
            flex-shrink: 0;
          }
        }
      }
    }

    // 中间商品信息区域
    .product-info {
      .title {
        font-size: 24px;
        line-height: 32px;
        color: #0F1111;
        margin-bottom: 8px;
      }

      .brand {
        margin-bottom: 12px;

        a {
          color: #007185;
          text-decoration: none;

          &:hover {
            color: #C7511F;
            text-decoration: underline;
          }
        }
      }

      .rating-section {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;

        :deep(.el-rate) {
          display: inline-flex;

          .el-rate__icon {
            font-size: 18px;
            margin-right: 2px;
          }

          .el-rate__text {
            font-size: 14px;
            color: #0F1111;
          }
        }

        .reviews {
          color: #007185;
          text-decoration: none;
          font-size: 14px;

          &:hover {
            color: #C7511F;
            text-decoration: underline;
          }
        }
      }

      .divider {
        height: 1px;
        background: #ddd;
        margin: 15px 0;
      }

      // 秒杀价格区域
      .price-section {
        background: #FFF4E6;
        padding: 16px;
        border-radius: 8px;
        margin: 15px 0;

        .deal-badge {
          margin-bottom: 12px;
          display: flex;
          gap: 8px;

          .deal-tag,
          .prime-tag {
            padding: 2px 8px;
            border-radius: 2px;
            font-size: 12px;
            font-weight: 500;
            color: #fff;
          }

          .deal-tag {
            background: #CC0C39;
          }

          .prime-tag {
            background: #00A8E1;
          }
        }

        .price-info {
          .current-price {
            display: flex;
            align-items: baseline;
            margin-bottom: 6px;

            .label {
              color: #565959;
              font-size: 13px;
              margin-right: 8px;
            }

            .currency {
              font-size: 14px;
              color: #CC0C39;
            }

            .amount {
              font-size: 28px;
              color: #CC0C39;
              font-weight: 500;
            }
          }

          .original-price {
            color: #565959;
            font-size: 13px;
            margin-bottom: 4px;
          }

          .save-info {
            font-size: 14px;

            .save-amount {
              color: #CC0C39;
              font-weight: 500;
              margin-right: 4px;
            }

            .save-percentage {
              color: #CC0C39;
            }
          }
        }
      }

      // 秒杀倒计时
      .seckill-timer {
        background: #f8f8f8;
        padding: 16px;
        border-radius: 8px;
        margin: 15px 0;
        text-align: center;

        .timer-label {
          color: #565959;
          font-size: 14px;
          margin-bottom: 10px;
        }

        .timer-digits {
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 6px;

          .digit {
            background: #0F1111;
            color: #fff;
            font-size: 24px;
            font-weight: bold;
            min-width: 40px;
            padding: 6px 8px;
            border-radius: 4px;
            text-align: center;
          }

          .colon {
            color: #0F1111;
            font-size: 24px;
            font-weight: bold;
          }
        }
      }

      // 秒杀进度条
      .progress-section {
        margin: 15px 0;

        :deep(.el-progress-bar__outer) {
          background-color: #eee;
          border-radius: 4px;
        }

        :deep(.el-progress-bar__inner) {
          background-color: #FF4E4E;
          border-radius: 4px;
        }

        .progress-info {
          display: flex;
          justify-content: space-between;
          margin-top: 8px;
          font-size: 14px;

          .sold {
            color: #CC0C39;
          }

          .stock {
            color: #007600;
          }
        }
      }
    }

    // 右侧购买区域
    .buy-box {
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 14px 18px;

      .price-display {
        margin-bottom: 10px;
        text-align: center;

        .currency {
          font-size: 14px;
          color: #0F1111;
        }

        .amount {
          font-size: 28px;
          color: #0F1111;
          font-weight: 500;
        }
      }

      .stock-status {
        color: #007600;
        margin: 10px 0;
        display: flex;
        align-items: center;
        gap: 8px;

        .el-icon {
          font-size: 16px;
        }
      }

      .quantity-selector {
        margin: 15px 0;
        display: flex;
        align-items: center;

        .label {
          color: #565959;
          font-size: 14px;
          margin-bottom: 5px;
          white-space: nowrap;
        }

        :deep(.el-select) {
          width: 100%;
        }
      }

      .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;

        button {
          width: 100%;
          height: 30px;
          font-size: 13px;
          border-radius: 20px;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          border: 1px solid;
          box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
          font-weight: 500;
          transition: all 0.1s ease;
        }

        .cart-button {
          background: #FFD814;
          border-color: #FCD200;
          color: #0F1111;

          &:hover {
            background: #F7CA00;
          }
        }

        .buy-button {
          background: #FFA41C;
          border-color: #FF8F00;
          color: #0F1111;

          &:hover {
            background: #FA8900;
          }
        }

        button:disabled {
          background: #F7F8F8;
          border-color: #D5D9D9;
          color: #999;
          cursor: not-allowed;
          box-shadow: none;
        }
      }

      .secure-transaction {
        margin-top: 15px;
        color: #067D62;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
    }

    // 响应式布局
    @media (max-width: 1200px) {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      padding: 0 15px;

      .product-gallery {
        top: 15px;
      }

      .product-info {
        .title {
          font-size: 20px;
          line-height: 28px;
        }

        .price-section,
        .seckill-timer {
          padding: 12px;
        }

        .seckill-timer {
          .timer-digits {
            .digit {
              font-size: 20px;
              min-width: 36px;
              padding: 5px 6px;
            }
          }
        }
      }
    }

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
      gap: 0;
      padding: 0;

      .product-gallery {
        position: relative;
        top: 0;
        padding: 12px;

        .main-image {
          border: none;
          padding: 0;
          margin-bottom: 12px;
        }

        .thumbnail-list {
          display: flex;
          justify-content: center;
          gap: 8px;
          padding: 0;
          max-width: 80%;
          margin: 0 auto;

          .thumbnail {
            width: 60px;
            height: 60px;
            flex-shrink: 0;
          }
        }
      }

      .product-info {
        padding: 12px;
        border-top: 1px solid #eee;

        .title {
          font-size: 18px;
          line-height: 24px;
        }

        .price-section,
        .seckill-timer {
          margin: 12px -12px;
          padding: 12px;
          border-radius: 0;
        }

        .seckill-timer {
          .timer-digits {
            .digit {
              font-size: 18px;
              min-width: 32px;
              padding: 4px;
            }

            .colon {
              font-size: 18px;
            }
          }
        }

        .progress-section {
          margin: 12px 0;
        }
      }
    }
  }

  // 商品详情标签页
  .product-details {
    max-width: 1500px;
    margin: 40px auto;
    padding: 0 20px;

    :deep(.el-tabs__nav-wrap::after) {
      height: 1px;
    }

    .detail-content {
      padding: 20px 0;

      h2 {
        font-size: 24px;
        color: #0F1111;
        margin-bottom: 16px;
      }

      p {
        color: #0F1111;
        line-height: 24px;
        margin-bottom: 20px;
      }

      .specs {
        h3 {
          font-size: 18px;
          color: #0F1111;
          margin-bottom: 12px;
        }

        table {
          width: 100%;
          border-collapse: collapse;

          td {
            padding: 8px;
            border-bottom: 1px solid #eee;

            &:first-child {
              width: 200px;
              color: #565959;
            }

            &:last-child {
              color: #0F1111;
            }
          }
        }
      }
    }
  }

  // 评论区域
  .reviews-section {
    padding: 20px 0;

    .rating-summary {
      display: flex;
      gap: 40px;
      margin-bottom: 30px;

      .overall-rating {
        text-align: center;

        .big-rating {
          font-size: 48px;
          font-weight: 500;
          color: #0F1111;
        }

        .stars {
          color: #FFA41C;
          margin: 10px 0;
        }

        .total-reviews {
          color: #565959;
        }
      }
    }

    .review-list {
      .review-item {
        padding: 20px 0;
        border-bottom: 1px solid #eee;

        &:last-child {
          border-bottom: none;
        }

        .review-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 10px;

          .user-info {
            display: flex;
            align-items: center;
            gap: 10px;

            .avatar {
              width: 32px;
              height: 32px;
              border-radius: 50%;
              object-fit: cover;
            }

            .username {
              color: #565959;
              font-size: 14px;
            }
          }

          .stars {
            color: #FFA41C;
            font-size: 14px;
          }
        }

        .review-content {
          .review-text {
            font-size: 14px;
            line-height: 1.5;
            color: #0F1111;
            margin-bottom: 10px;
          }

          .review-date {
            font-size: 12px;
            color: #565959;
          }
        }
      }
    }
  }

  // 移动端适配
  @media (max-width: 1200px) {
    .buy-box {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 100;
      background: #fff;
      border: none;
      border-radius: 0;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
      padding: 12px;

      .price-display,
      .stock-status,
      .secure-transaction {
        display: none;
      }

      .action-buttons {
        flex-direction: row;
        margin: 0;
      }
    }

    .product-details {
      margin-bottom: 80px;
    }
  }
}
